home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / dosutils / tsbat50.zip / POPDIRE.BAT < prev    next >
DOS Batch File  |  1992-08-29  |  958b  |  34 lines

  1. @echo off
  2. echo ┌────────────────────────────────────────────────────┐
  3. echo │ Nonresident popdir (Restores the pushed directory) │
  4. echo │ By Prof. Timo Salmi, ts@uwasa.fi, Sat 29-Aug-92    │
  5. echo └────────────────────────────────────────────────────┘
  6.  
  7. rem It is advisable to have popdire.bat at path
  8. rem See pushdire.bat for more instructions
  9.  
  10. rem Check that the directory has been pushed by PUSHDIRE.BAT
  11. if "%pushdriv%"=="" goto _err
  12. if "%pushdire%"=="" goto _err
  13.  
  14. rem Pop first the original drive and then the original directory
  15. %pushdriv%
  16. cd %pushdire%
  17.  
  18. rem Show if asked
  19. for %%s in (s S) do if "%1"=="/%%s" cd
  20. goto _out
  21.  
  22. :_err
  23. echo.
  24. echo Error: No direcectory name has been pushed
  25. echo Use PUSHDIRE.BAT for pushing directory names
  26. goto _out
  27.  
  28. rem The commands below release the relevant environment variables
  29. rem If you omit them, popdire can be used without pushdire in between
  30. :_out
  31. set pushdriv=
  32. set pushdire=
  33. echo on
  34.